/**
 * Created by luomingzhong on 16/12/9.
 */
var http = require('http');
var fs = require('fs');
var oppressor = require('oppressor');
/**
 * pipe 会自动监听data end事件
 */
var server = http.createServer(function (req, res) {
   console.log(req);
   var stream =  fs.createReadStream(__dirname + '/streamfiles/a.txt');
       stream.pipe(res);
});
server.listen(8000);